import axios from '../utils/request';

export const Shows = (nm,pindex,psize) => {
    return axios({
        url: '/api/Good/Show?nm=' + nm +"&Pindex=" +pindex+"&Psize="+psize,
        method: 'get',
        params: (nm,pindex,psize)
        // params: query //get请求使用params属性去传递
    });
};
export const Del = id => {
    return axios({
        url: '/api/Good/PDel?id='+id,
        method: 'post',
        data: id //post请求使用data属性去传递
    });
};
export const BInd = () => {
    return axios({
        url: '/api/Good/BInd',
        method: 'get',
        //get请求使用params属性去传递
    });
};
// export const BInd = query => {
//     return axios({
//         url: '/api/Good/BInd',
//         method: 'get',
//         params: query //get请求使用params属性去传递
//     });
// };
export const Add = model => {
    return axios({
        url: '/api/Good/PAdd',model,
        method: 'post',
        data: model //post请求使用data属性去传递
    });
};